package simulator.position;

public class Direction {

	private double orientation;

	public Direction(double orientation) {
		this.setOrientation(orientation);
	}

	public double getOrientation() {
		return orientation % 360;
	}

	public void setOrientation(double orientation) {
		this.orientation = orientation;
	}
	
	public void rotate(double degrees) {
		orientation += degrees;
	}
	
	public static Direction addDirection(Direction dir1, Direction dir2) {
		return new Direction(dir1.getOrientation() + dir2.getOrientation());
	}
}
